﻿using CatUtils.Utils.Currency.TextUtils;
using CatUtils.Utils.SpecialUtils.ContentHelper.bangumi;
using CatUtils.Utils.SpecialUtils.ContentHelper.MoeWiki;
using CatUtils.Utils.SpecialUtils.EditHelper;
using System.Collections.Generic;

namespace SpiderStudy.WebSite.Baidu
{
    internal class ContentTool
    {
        /// <summary>
        /// 自动创建文本内容
        /// </summary>
        /// <param name="Tags"></param>
        /// <returns></returns>
        public static string AutoCreteContent(List<string> Tags)
        {
            foreach (var item in Tags)
            {
                string TempContent = AutoCreteContent(item);
                if (TempContent != "")
                    break;
            }
            return "";
        }

        /// <summary>
        /// 自动创建文本内容
        /// </summary>
        /// <param name="Tags"></param>
        /// <returns></returns>
        public static string AutoCreteContent(string Tags)
        {
            string Content = MoeWikiHelper.Search(Tags);
            if (Content == "")

                Content = BangGumiHelper.SearchAuto(Transcoding.UrlDeCode(Tags));
            return SimplifiedChineseToTraditional.ToSimplifiedChinese(Content).Trim();
        }
    }
}